package data;

import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.TreeMap;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

public class TraceMap extends TreeMap<Date, Location>{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public TraceMap (String filename) throws ParserConfigurationException, SAXException, IOException{
		SAXParserFactory factory = SAXParserFactory.newInstance(); 
		SAXParser saxParser = factory.newSAXParser(); 
		DefaultHandler handler = new TraceMapHandler(this); 
		saxParser.parse( new File(filename), handler );
	}
	
	public TraceMap (){
		super();
	}
	
}
